package com.qidian.mes.pro.controller;

import com.qidian.mes.pojo.pro.ProRouteProcess;
import com.qidian.mes.pro.service.ProRouteProcessService;
import com.qidian.mes.util.pojo.MESResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author 郭靖旖
 * @Company
 * @Time 2023/11/2 19:00
 * @Description
 **/
@RestController
@CrossOrigin
@RequestMapping("/routeProcess")
public class ProRouteProcessController {
@Autowired
ProRouteProcessService proRouteProcessService;
    @PostMapping("/save")
    public MESResult save(@RequestBody ProRouteProcess proRouteProcess){
        System.out.println(proRouteProcess);
        return proRouteProcessService.save(proRouteProcess);
    }
    @GetMapping("/get")
    public MESResult get(int page,int limit,Long routeId){
        return proRouteProcessService.selectByrouteId(page,limit,routeId);
    }
    @DeleteMapping("/deleteRouteProcess")
    public MESResult deleteRouteProcess(Long recordId){
        return proRouteProcessService.deleteRouteProcess(recordId);
    }
    @PostMapping("/update")
    public MESResult update(@RequestBody ProRouteProcess proRouteProcess){
        return proRouteProcessService.update(proRouteProcess);
    }
}
